package com.whmnx.my.ui.viewmodel;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.whmnx.base.bean.MoneyBean;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.ItemViewModel;

/**
 * author : huang
 * date   : 2020/9/24 0024 17:50
 * version: 1.0
 * @author Administrator
 */
public class WithdrawItemViewModel3 extends ItemViewModel {
    public ObservableField<String> MoneyFlowing_Title = new ObservableField<>("");
    public ObservableField<String> MoneyFlowing_Amount = new ObservableField<>("");
    public ObservableField<String> CreateDate = new ObservableField<>("");

    public WithdrawItemViewModel3(@NonNull BaseViewModel viewModel, MoneyBean.FlowingListModelBean flowingListModelBean) {
        super(viewModel);
        MoneyFlowing_Title.set(flowingListModelBean.getMoneyFlowing_Title());
        if (flowingListModelBean.getIsAdd() == 1){
            MoneyFlowing_Amount.set("+" + flowingListModelBean.getMoneyFlowing_Amount());
        }else {
            MoneyFlowing_Amount.set("-" + flowingListModelBean.getMoneyFlowing_Amount());
        }

        CreateDate.set(flowingListModelBean.getCreateDate());

    }
}
